body {
    margin: 0;
    padding: 20px;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.batch-logo {
    font-size: 3em;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.title {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    font-style: italic;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: white;
    border-bottom: 1px solid #ecf0f1;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #e74c3c;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
}

.user-level {
    color: #7f8c8d;
    font-size: 0.9em;
}

.user-resources {
    display: flex;
    gap: 20px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 12px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.resource-icon {
    font-size: 1.3em;
}

.resource-amount {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1em;
}

.batch-config {
    padding: 30px;
    background: white;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.config-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #2c3e50;
}

.quick-actions {
    display: flex;
    gap: 10px;
}

.quick-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.quick-btn:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
}

.recipe-selection {
    margin-bottom: 30px;
}

.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.selection-title {
    font-size: 1.4em;
    font-weight: bold;
    color: #2c3e50;
}

.recipe-filters {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-category, .filter-rarity {
    padding: 10px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    background: white;
    color: #2c3e50;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-category:focus, .filter-rarity:focus {
    outline: none;
    border-color: #e74c3c;
}

.search-recipe {
    padding: 10px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    background: white;
    color: #2c3e50;
    font-weight: 500;
    width: 200px;
    transition: all 0.3s ease;
}

.search-recipe:focus {
    outline: none;
    border-color: #e74c3c;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.recipe-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.recipe-card.common {
    border-color: #95a5a6;
}

.recipe-card.uncommon {
    border-color: #27ae60;
}

.recipe-card.rare {
    border-color: #3498db;
}

.recipe-card.epic {
    border-color: #9b59b6;
}

.recipe-card.legendary {
    border-color: #f39c12;
}

.recipe-image {
    position: relative;
    text-align: center;
    margin-bottom: 15px;
}

.recipe-image img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
}

.recipe-rarity-badge {
    position: absolute;
    top: -5px;
    right: 20px;
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: bold;
}

.recipe-info {
    text-align: center;
    margin-bottom: 15px;
}

.recipe-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.recipe-category {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 3px;
}

.recipe-level {
    color: #e74c3c;
    font-size: 0.8em;
    font-weight: 600;
}

.recipe-materials {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.material-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 15px;
    border: 1px solid #ecf0f1;
}

.material-item.insufficient {
    background: #fff5f5;
    border-color: #e74c3c;
    color: #e74c3c;
}

.material-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.material-count {
    font-size: 0.8em;
    font-weight: 600;
}

.recipe-actions {
    text-align: center;
}

.add-recipe-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-recipe-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
}

.add-recipe-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.synthesis-queue {
    padding: 30px;
    background: #f8f9fa;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.queue-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #2c3e50;
}

.queue-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
}

.stat-value {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1em;
}

.queue-content {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.queue-item {
    display: grid;
    grid-template-columns: 40px 80px 1fr 200px 200px;
    gap: 20px;
    align-items: center;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.queue-item:hover {
    border-color: #e74c3c;
    background: white;
}

.item-order {
    width: 30px;
    height: 30px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}

.item-image img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.item-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #2c3e50;
}

.item-quantity, .item-time {
    color: #7f8c8d;
    font-size: 0.9em;
}

.item-materials {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.material-summary {
    display: flex;
    align-items: center;
    gap: 4px;
    background: white;
    padding: 6px 10px;
    border-radius: 15px;
    border: 1px solid #ecf0f1;
}

.material-need {
    font-size: 0.8em;
    font-weight: 600;
    color: #2c3e50;
}

.item-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #2980b9;
}

.quantity-input {
    width: 60px;
    padding: 6px;
    text-align: center;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-weight: 600;
}

.remove-btn, .move-up-btn, .move-down-btn {
    padding: 6px 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.move-up-btn, .move-down-btn {
    background: #95a5a6;
}

.remove-btn:hover {
    background: #c0392b;
}

.move-up-btn:hover, .move-down-btn:hover {
    background: #7f8c8d;
}

.remove-btn:disabled, .move-up-btn:disabled, .move-down-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.empty-queue {
    text-align: center;
    padding: 60px 30px;
    color: #7f8c8d;
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.empty-text {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

.empty-desc {
    font-size: 1.1em;
}

.resource-overview {
    padding: 30px;
    background: white;
}

.overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.overview-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #2c3e50;
}

.overview-actions {
    display: flex;
    gap: 10px;
}

.auto-buy-btn, .optimize-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auto-buy-btn:hover:not(:disabled), .optimize-btn:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-2px);
}

.auto-buy-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.resource-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.resource-card.insufficient {
    border-color: #e74c3c;
    background: #fff5f5;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.resource-image {
    position: relative;
    text-align: center;
    margin-bottom: 15px;
}

.resource-image img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.insufficient-badge {
    position: absolute;
    top: -5px;
    right: 20px;
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: bold;
}

.resource-details {
    text-align: center;
    margin-bottom: 15px;
}

.resource-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
}

.resource-need, .resource-have {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 3px;
}

.resource-missing, .resource-cost {
    color: #e74c3c;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 3px;
}

.resource-actions {
    text-align: center;
}

.buy-resource-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-resource-btn:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
}

.synthesis-settings {
    padding: 30px;
    background: #f8f9fa;
}

.settings-header {
    margin-bottom: 25px;
}

.settings-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #2c3e50;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.setting-group {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.setting-label {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    display: block;
}

.setting-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    background: white;
    color: #2c3e50;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.setting-select:focus {
    outline: none;
    border-color: #e74c3c;
}

.setting-desc {
    color: #7f8c8d;
    font-size: 0.9em;
    line-height: 1.4;
}

.bonus-options, .notification-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bonus-option, .notification-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.bonus-option input, .notification-option input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.bonus-text, .notification-text {
    color: #2c3e50;
    font-weight: 500;
}

.execution-control {
    padding: 30px;
    background: white;
}

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.control-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #2c3e50;
}

.execution-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.idle {
    background: #95a5a6;
}

.status-indicator.running {
    background: #27ae60;
}

.status-indicator.paused {
    background: #f39c12;
}

.status-indicator.error {
    background: #e74c3c;
}

.status-text {
    font-weight: 600;
    color: #2c3e50;
}

.control-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
}

.control-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.start-btn {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.pause-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.stop-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.preview-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.control-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.control-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.execution-progress {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-text {
    font-weight: 600;
    color: #2c3e50;
}

.progress-percentage {
    font-size: 1.2em;
    font-weight: bold;
    color: #e74c3c;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #ecf0f1;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.progress-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.current-item, .remaining-time, .completed-count {
    color: #7f8c8d;
    font-size: 0.9em;
    text-align: center;
}

.synthesis-history {
    padding: 30px;
    background: #f8f9fa;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.history-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #2c3e50;
}

.view-all-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 20px;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.history-time {
    color: #7f8c8d;
    font-size: 0.9em;
    text-align: center;
}

.history-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-text {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1em;
}

.summary-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
}

.success-count {
    color: #27ae60;
    font-weight: 600;
}

.failure-count {
    color: #e74c3c;
    font-weight: 600;
}

.total-time {
    color: #7f8c8d;
    font-weight: 600;
}

.history-actions {
    display: flex;
    gap: 10px;
}

.repeat-btn, .details-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.repeat-btn {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.details-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.repeat-btn:hover, .details-btn:hover {
    transform: translateY(-2px);
}

.footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

.footer-info {
    max-width: 600px;
    margin: 0 auto;
}

.info-text {
    font-size: 1.1em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.update-time {
    font-size: 0.9em;
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .recipe-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .resource-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 1200px) {
    .user-info {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .config-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .selection-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .recipe-filters {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .queue-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .queue-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .overview-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .overview-actions {
        justify-content: center;
    }
    
    .control-header {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .history-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 15px;
    }
    
    .header {
        padding: 20px;
    }
    
    .title {
        font-size: 2em;
    }
    
    .batch-config, .synthesis-queue, .resource-overview, .synthesis-settings, .execution-control, .synthesis-history {
        padding: 20px;
    }
    
    .recipe-grid {
        grid-template-columns: 1fr;
    }
    
    .queue-item {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .item-controls {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .resource-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .control-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .progress-details {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .history-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
    }
    
    .history-actions {
        justify-content: center;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .user-resources {
        flex-direction: column;
        gap: 10px;
    }
}